#include <Road.h>
Public Member Functions | |
| RoadMap (osg::ref_ptr< osg::Group > sgroot) | |
| void | addRoadMaptoRoot (osg::ref_ptr< osg::Group > sgroot, int flag) |
| void | loadRoadScene (void) |
| osg::Vec3d | getpt (const int np) |
| osg::Group * | makedelaunay () |
| void | addNewRoad (RoadType type) |
| void | addPoint (osg::Vec3 position) |
| void | setActiveRoadIndex (int index) |
| int | getActiveRoadIndex (void) |
| int | getLastRoadIndex () |
| void | pinControl (osg::ref_ptr< osg::Group > sgroot) |
| void | clearRoadMap () |
| osg::ref_ptr< osg::Group > | returnRoadNode () |
| void | addRoadNode (osg::ref_ptr< osg::Node > roadNodeToBeAdded) |
Private Attributes | |
| vector< Road * > | roadMap |
| int | currentRoadIndex |
| int | lastRoadIndex |
| int | pinFlag |
| osg::Vec3Array * | points |
| osg::ref_ptr< osg::Group > | roadRoot |
| osg::ref_ptr< osg::Group > | dotRootNode |
| osg::ref_ptr< osg::Group > | lineRootNode |
| osg::ref_ptr< osg::Group > | linedotRoot |
| osg::ref_ptr< osg::Group > | savedMap |
Friends | |
| class | Road |
|
|
constructor takes the root as argument it adds 2 elements to this root. one is for the dots&lines (linedotRoot) the other is for the plane geometry which contains points that also includes roads.(roadRoot) initially the dots and lines are displayed.
|
|
|
add a new Road with the type specified, to the roadMap vector of the theRoadMap object this function also adds the new Road's dotRoot an dlineRoot to dotRootNode and lineRootNode respectively
|
|
|
adds the specified point to the current Road Object
|
|
||||||||||||
|
adds the RoadMap to the root given as first argument. if the second argument is a 1 then the dots and line's geode is also added to the tree.
|
|
|
needed for file operations the argument is made the new RoadMap
|
|
|
clears all the roads from the map |
|
|
get active Road index
|
|
|
|
|
|
fills the points array initally for a constructing the ground |
|
|
this function should be called whenever the texturized environment is needed. it changes the children of the roadRoot with the new scene. |
|
|
this function forms the actual texturized environment added to the scene. the lines of splines are turned into texturized road pieces and placed in the plane.
|
|
|
this function removes the dots and lines in the environment from the tree according to the pinFlag's condition. if the flag is 0 meaning the dots and lines are not shown then it becomes one and the linedotRoot is added to the the tree else if the flag is 1, it is made 0 by this function and the linedotRoot is removed from the tree
|
|
|
returns the RoadMap as a Group |
|
|
Set active road index
|
|
|
|
|
|
the active Road index |
|
|
all Road's dotRoot groups are added to this group |
|
|
the lastly added Road index |
|
|
dotRootNode and lineRootNode is added to this group and this group is added to the root provided in the initialization in the constructor of RoadMap |
|
|
all Road's lineRoot groups are added to this group |
|
|
the flag for control of the pins and lines |
|
|
the plane's points |
|
|
the added Road objects kept int this vector |
|
|
makedelaunay function adds the node containing the goede that involves points with texturing |
|
|
holding the previously saved osg models. in each save operation the road structure is added to this root as a child. |
1.4.6-NO